const index = `
<html>
    <head>
        <title>首页</title>    
    </head>
    <body>
        <h1>这是首页标题</h1>    
    </body>
</html>`
const student = `
<html>
    <head>
        <title>Student</title>    
    </head>
    <body>
        <h1>这是Student标题</h1>    
    </body>
</html>`
const notFound = `
<html>
    <head>
        <title>Not Found</title>    
    </head>
    <body>
        <h1>这是Not Found标题</h1>    
    </body>
</html>`
const showIndex = (req, res) => {
    res.statusCode = 200
    res.setHeader('Content-Type', 'text/html;charset=UTF-8')
    res.end(index)
}

const showStudent = (req, res) => {
    res.statusCode = 200
    res.setHeader('Content-Type', 'text/html;charset=UTF-8')
    res.end(student)
}

const show404 = (req, res) => {
    res.statusCode = 200
    res.setHeader('Content-Type', 'text/html;charset=UTF-8')
    res.end(notFound)
}

module.exports = {
    showIndex,
    showStudent,
    show404
}